{% extends "base.html" %}

{% block content %}


<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">
<table width='80%' class='grid' cellspacing='1' align='center'><tr><td colspan='3' class='title' align="center">The sent mails</td></tr>
<tr valign='middle' align='left'></tr>
  <tr valign='middle' align='left'>
  <td class='odd' width='10%' align='center'>ID</td>
  <td class='even' width='15%' align='center'>sales</td>
  <td class='odd' width='20%' align='center'>Program</td>
  <td class='even' width='20%' align='center'>sent time</td>
<td class='odd' align='center'>mail</td>  

  </tr>
  {% for m in mail_list %}
 
  <tr valign='middle' align='left'>
  <td class='odd'>{{m.id}}</td>
   <td class='even'>{{m.sales.name}}</td>
   <td class='odd'>{{m.members.projects.name}}</td>
   <td class='even'>{{m.sendtime|date:"Y-m-d H:i:s"}}</td>
<td class='odd' >{{m.tomail}}</td>
  </tr>

  {% endfor %}
      <tr><td  class='even' colspan="10" align="right">
{% if is_paginated %}
                    {% ifequal current_page 1 %}first 
                    {% else %} <a href="/{{url}}/">first</a>
                    {% endifequal %}
                    {% if has_previous %} <a href="/{{url}}/{{ previous_page }}/">prev</a>
                    {% else %} prev
                    {% endif %}
                    {% if has_next %}<a href="/{{url}}/{{ next_page }}/">next</a>
                    {% else %}next
                    {% endif %}
                    {% ifequal current_page pages %}last
                    {% else %} <a href="/{{url}}/{{ pages }}/">last</a>
                    {% endifequal %}
                    &nbsp;&nbsp;
                    Current：{{ current_page }}/{{ pages }}&nbsp;&nbsp;
                {% endif %}              
               {{ hits }} Records 
</td></tr>

</table>


{% endblock %}